package com.wecan.base.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @Author liuzhihao
 * @Date 2022.02.25
 * @Version ${version}
 * @Description ${description}
 */
public enum OrderStatus {

    WAIT_PAY(0, "待支付"),
    WAIT_DELIVERY(1, "待发货"),
    WAIT_RECEIVE(2, "待收货"),
    WAIT_REFUND(3, "待退款"),
    HAS_DONE(4, "已完成"),
    WAIT_COMMENT(5, "待评价"),
    HAS_CLOSE(6, "已关闭"),
    HAS_CANCEL(7, "已取消"),
    HAS_REFUND(8, "已退款"),
    WAIT_CONFIRM(9, "待确认");

    @EnumValue
    @JsonValue
    private final int code;

    private final String desc;

    OrderStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }
}
